{extend name="public/base" /}

{block name="title"}<title>后台首页</title>{/block}

{block name="pjax_container"}
<div class="hry-content-wrapper">
<section class="content-header">
    <ol class="breadcrumb">
        <li class="active">后台首页</li>
    </ol>
</section>
<section class="content">
    <div class="alert alert-danger" style="display:none;">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <p></p>
        <p></p>
    </div>
    <div class="row">
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-yellow">
                <div class="inner"><h3>{$userTotal}</h3><p>{$Think.lang.user_num}</p></div>
                <div class="icon"><i class="fa fa-users"></i></div>
                <a href="{:url('Member/index')}" class="small-box-footer">{$Think.lang.more} <i class="fa fa-arrow-circle-right"></i></a>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-green">
                <div class="inner"><h3>{$archiveTotal.youxiao}/{$archiveTotal.wuxiao}</h3><p>{$Think.lang.archive_num}</p></div>
                <div class="icon"><i class="fa fa-file-text"></i></div>
                <a href="{:url('Member/index')}" class="small-box-footer">{$Think.lang.more} <i class="fa fa-arrow-circle-right"></i></a>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-aqua">
                <div class="inner"><h3>{$userNear}</h3><p>{$Think.lang.new_user_num}</p></div>
                <div class="icon"><i class="fa fa-user-plus"></i></div>
                <a href="{:url('Member/index')}" class="small-box-footer">{$Think.lang.more} <i class="fa fa-arrow-circle-right"></i></a>
            </div>
        </div>
        <div class="col-lg-3 col-sm-6 col-xs-12">
            <div class="small-box bg-red">
                <div class="inner"><h3>{$guestbookTotal}</h3><p>{$Think.lang.new_guestbook_num}</p></div>
                <div class="icon"><i class="fa fa-commenting"></i></div>
                <a href="{:url('Member/index')}" class="small-box-footer">{$Think.lang.more} <i class="fa fa-arrow-circle-right"></i></a>
            </div>
        </div>
        <div class="col-lg-7 col-sm-7 col-xs-12" >
          <div class="nav-tabs-custom" style="padding: 10px">
            <ul class="nav nav-tabs pull-right">
              <li class="active"><a href="#sales-month" data-toggle="tab">月</a></li>
              <li><a href="#sales-week" data-toggle="tab">周</a></li>
              <li><a href="#sales-day" data-toggle="tab">天</a></li>
              <li class="pull-left header"><i class="fa fa-inbox"></i> {$Think.lang.login_30_count}</li>
            </ul>
            <div class="tab-content no-padding">
              <div class="chart tab-pane active" id="sales-month" style="position: relative; height: 300px;">
                  <div id="month-line" style="height: 300px;width: 1613px"></div>
			  </div>
              <div class="chart tab-pane" id="sales-week" style="position: relative; height: 300px;">
                  <div id="week-line" style="height: 300px;width: 1613px"></div>
			  </div>
              <div class="chart tab-pane" id="sales-day" style="position: relative; height: 300px;">
				<div id="day-line" style="height: 300px;width: 1613px"></div>
			  </div>
            </div>
          </div>
        </div>
        <div class="col-lg-7 col-sm-5 col-xs-12">
            <div class="hry-form-wrapper" id="home">
                <div class="box-header">
                    <h3 class="box-title"><i class="fa fa-inbox"></i> {$Think.lang.wait_some}</h3>
                </div>
                <div class="box-body no-padding">
                    <table class="table table-hover">
                        <tr>
                            <th>{$Think.lang.order_sn}</th>
                            <th>{$Think.lang.user_name}</th>
                            <th>{$Think.lang.user_phone}</th>
                            <th>{$Think.lang.money}</th>
                            <th>{$Think.lang.user_time}</th>
                            <th>{$Think.lang.user_status}</th>
                        </tr>
						{if empty($WaitThingList)}
						<tr>
							<td align="center" colspan="6">暂无待办事项~</td>
						</tr>
						{else}
                        {volist name="WaitThingList" id="vo"}
                        <tr>
                            <td><a href="{:url('Money/look',['id'=>$vo.id])}">{$vo.order}</a></td>
                            <td>{$vo.username}</td>
                            <td>{$vo.mobile}</td>
                            <td>￥{$vo.money}</td>
                            <td>{$vo.date}</td>
                            <td>
							{if $vo.status eq 0}
							<span class="hry-tag label-shenhe">待审核</span>
							{else}
							<span class="hry-tag label-wait">待打款</span>
							{/if}
							</td>
                        </tr>
                        {/volist}
						<tr>
							<td align="center" colspan="6"><a href="{:url('Money/withdraw')}">查看更多>></a></td>
						</tr>
						{/if}
                    </table>
                </div>
            </div>
        </div>
        <!-- <div class="col-lg-5 col-sm-5 col-xs-12"> -->
            <!-- <div class="hry-form-wrapper"> -->
                <!-- <div class="box-header"> -->
                    <!-- <h3 class="box-title">{$Think.lang.system_config}</h3> -->
                <!-- </div> -->
                <!-- <div class="box-body no-padding"> -->
                    <!-- <table class="table table-hover"> -->
                        <!-- {volist name="systemConfig" id="vo" } -->
                        <!-- <tr> -->
                            <!-- <td>{$key}：{$vo}</td> -->
                        <!-- </tr> -->
                        <!-- {/volist} -->
                    <!-- </table> -->
                <!-- </div> -->
            <!-- </div> -->
        <!-- </div> -->
    </div>
</section>
</div>
<script>
$(function () {
    var DaycountLineJson = {$DaycountLineJson};
    console.log(DaycountLineJson)
    var dayline = document.getElementById('day-line')
    let myChart = echarts.init(dayline)
    let option = arrangementData(DaycountLineJson)
    myChart.setOption(option);
    // 一周
    var WeekcountLineJson = {$WeekcountLineJson};
    var weekline = document.getElementById('week-line')
    let weekChart = echarts.init(weekline)
    let weeklineption = arrangementData(WeekcountLineJson)
    weekChart.setOption(weeklineption);
    // 一月
    var MonthcountLineJson = {$MonthcountLineJson};
    var monthline = document.getElementById('month-line')
    let monthChart = echarts.init(monthline)
    let monthlineption = arrangementData(MonthcountLineJson)
    monthChart.setOption(monthlineption);
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
});
function arrangementData(data) {
    var colors = ['#00c0dc', '#d14a61'];

    let option = {
        showSymbol: false,
        color: colors,
        legend: {
            data:data.name,
            top: '10',
            itemWidth: 28,
            itemHeight: 6,
            textStyle: {
                fontSize: 12,
                color: '#646769'
            }
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'line',
                lineStyle: {
                    opacity: 0
                }
            },
            backgroundColor: '#FFFFFF',
            borderWidth: 1,
            borderColor: '#92C9FF',
            padding: [8, 18],
            textStyle: {
                color: '#646769',
                fontFamily: 'PingFangSC-Medium',
                fontSize: 11
            },
            extraCssText: 'box-shadow: 0 2px 4px 0 rgba(131,133,136,0.22)'
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        toolbox: {
            feature: {
                saveAsImage: {}
            }
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data.labels,
            axisLine: {
                lineStyle: {
                    color: '#E8E8E8'
                }
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                textStyle: {
                    color: '#7A7A7A'
                }
            }
        },
        yAxis: {
            type: 'value',
            axisLine: {
                lineStyle: {
                    color: '#E8E8E8'
                }
            },
            splitLine: {
                lineStyle: {
                    color: '#F2F2F2'
                }
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                textStyle: {
                    color: '#7A7A7A'
                }
            }
        },
        series: data.datasets
    };
    return option
}
</script>
{/block}